//index.js
//获取应用实例
const app = getApp()

Page({
	data:{
		on_reward:'on'
	},
  onLoad: function (options) {
    var nickName = '';
    var icon = '';
    var openid = '';
    var zone_name = '';
    try {
      nickName = wx.getStorageSync('nickname');
      openid = wx.getStorageSync('openid');
      icon = wx.getStorageSync('icon');
      zone_name = wx.getStorageSync('zone_name');
    } catch (e) {
      // Do something when catch error
    }
    if (!openid || !nickName) {
      wx.navigateTo({
        url: '../logs/accredit?jump=../complete/make_wish'
      });
    }
    var url = app.wapDomain + "Canvas/make_wish.html?username=" + encodeURI(nickName) + "&icon=" + icon + "&openid=" + openid
    console.log("测试"+url);
    //"ss" 
    this.setData({
      url: url,
    });
  },
  onShareAppMessage: function () {
    return app.onShareAppMessage();
  }
})


